﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace XGameFrame.Graphic
{
    public class StaticSprite:StaticSpriteBase
    {
        public StaticSprite(Texture2D pTexture,Vector2 pPosition)
            :base(pTexture,pPosition)
        {

        }

        public override void Update(GameTime pGameTime)
        {
            Bounds = new Rectangle((int)Position.X,
            (int)Position.Y,
            (int)Texture.Width,
            (int)Texture.Height);

            SourceRectangle = new Rectangle(
            0,
            0,
            (int)Texture.Width,
            (int)Texture.Height);

            DestRectangle = new Rectangle((int)Position.X,
                (int)Position.Y,
                (int)Texture.Width,
                (int)Texture.Height);
            base.Update(pGameTime);
        }

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch pSpriteBatch)
        {
            pSpriteBatch.Draw(Texture, Position, SourceRectangle, Color.White, Rotation, Origin, Scale, SpriteEffect, LayerDepth);
        }

        public override void OnHover(Microsoft.Xna.Framework.PlayerIndex pPlayerIndex)
        {
        }

        public override void HandleInput(Microsoft.Xna.Framework.PlayerIndex pPlayerIndex)
        {
        }
    }
}
